﻿<phone:PhoneApplicationPage xmlns:my="clr-namespace:MP3tunes.LockerPlayer.UserControls"  
    x:Class="MP3tunes.LockerPlayer.Pages.MediaPlayer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
       xmlns:local="clr-namespace:MP3tunes.LockerPlayer"
                            mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource BaseForeground}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" >

    <phone:PhoneApplicationPage.Resources>
        <DataTemplate x:Name="NormalTemplate">
            <Grid Width="430">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="50"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                    <RowDefinition Height="*"/>

                </Grid.RowDefinitions>
                <StackPanel Grid.ColumnSpan="2" Grid.RowSpan="2">
                    <TextBlock Text="{Binding TrackTitle}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Grid.Row="0" Grid.Column="0" Foreground="{StaticResource BaseForeground}"/>
                    <TextBlock Text="{Binding AlbumTitle}" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="{StaticResource BaseForegroundAccent}" >

                    </TextBlock>
                    <TextBlock Text="{Binding ArtistName}" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"  Foreground="{StaticResource BaseForegroundAccent}" >

                    </TextBlock>
                </StackPanel>

            </Grid>
        </DataTemplate>
        <DataTemplate x:Name="SelectedTemplate">
            <Grid Width="430">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="75"/>
                    <ColumnDefinition Width="*"/>
                   
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                    <RowDefinition Height="*"/>

                </Grid.RowDefinitions>
                <StackPanel Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="76,0,0,0">
                    <TextBlock Text="{Binding TrackTitle}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Grid.Row="0" Grid.Column="0" Foreground="{StaticResource BaseForeground}"/>
                    <TextBlock Text="{Binding AlbumTitle}" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="{StaticResource BaseForegroundAccent}" >

                    </TextBlock>
                    <TextBlock Text="{Binding ArtistName}" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"  Foreground="{StaticResource BaseForegroundAccent}" >

                    </TextBlock>
                </StackPanel>
                <Image Grid.Row="0" Grid.Column="0" Width="75" Height="75" Source="{Binding AlbumArtUrl}" VerticalAlignment="Center">
                    <Image.Clip>
                        <RectangleGeometry RadiusX="12" RadiusY="12" Rect="0,0,75,75" />
                    </Image.Clip>
                </Image>

               

            </Grid>

        </DataTemplate>
        <Style x:Key="MuteButtonStyle" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="{TemplateBinding Background}">

                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                             
                                    <VisualState x:Name="Normal">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenterSelected" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0" >
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenterSelected" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver"/>
                                      
                                </VisualStateGroup>
                              
                            </VisualStateManager.VisualStateGroups>

                            



                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}">
                                <ContentPresenter.Content>
                                    <Image x:Name="muteImage" Width="30" Height="30" Source="/MP3tunes.LockerPlayer;component/Images/mute.png">
                                        <ToolTipService.ToolTip>
                                            <ToolTip Content="Mute"></ToolTip>
                                        </ToolTipService.ToolTip>
                                    </Image>
                                </ContentPresenter.Content>
                            </ContentPresenter>
                                              
                            <ContentPresenter x:Name="contentPresenterSelected" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}">
                                <ContentPresenter.Content>
                                    <Image x:Name="muteImagePressed" Width="30" Height="30" Source="/MP3tunes.LockerPlayer;component/Images/mutePressed.png">
                                        <ToolTipService.ToolTip>
                                            <ToolTip Content="Mute"></ToolTip>
                                        </ToolTipService.ToolTip>
                                    </Image>
                                </ContentPresenter.Content>
                            </ContentPresenter>
                                            
            
                        </Grid>


                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="MediaPlayerListItemStyle" TargetType="ListBoxItem">
            <Setter Property="Padding" Value="3"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="TabNavigation" Value="Local"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Grid Background="{TemplateBinding Background}">

                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <!--<VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value=".35"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>-->
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenterSelected" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Selected">

                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="fillColor2" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value=".65"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenterSelected" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <!--<VisualState x:Name="Focused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>-->
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>

                            <Rectangle x:Name="fillColor" Fill="#363b4c" RadiusX="10"  RadiusY="10" IsHitTestVisible="False" Opacity="0">

                            </Rectangle>
                            <Rectangle x:Name="fillColor2" Fill="#363b4c" RadiusX="10"  RadiusY="10" IsHitTestVisible="False" Opacity="0">

                            </Rectangle>



                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{StaticResource NormalTemplate}"/>
                            <ContentPresenter x:Name="contentPresenterSelected" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{StaticResource SelectedTemplate}"/>

                            <Rectangle x:Name="FocusVisualElement" Stroke="White" StrokeThickness="1" RadiusX="20" RadiusY="20" Visibility="Collapsed"/>

                        </Grid>

                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <DataTemplate x:Key="BlackListItemTemplate">
            <StackPanel Margin="0,0,0,5" Width="329" >


                <TextBlock Text="{Binding TrackTitle}" TextWrapping="Wrap"  Foreground="{StaticResource BaseForeground}" Style="{StaticResource PhoneTextExtraLargeStyle}" />
                <TextBlock Text="{Binding AlbumTitle}" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" Foreground="{StaticResource BaseForegroundAccent}" >

                </TextBlock>
                <TextBlock Text="{Binding ArtistName}" HorizontalAlignment="Left" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"  Foreground="{StaticResource BaseForegroundAccent}" >

                </TextBlock>
            </StackPanel>
        </DataTemplate>
       
        <LinearGradientBrush x:Key="BlueProgressBarIndicatorAnimatedFill"
                     StartPoint="0,0"
                     EndPoint="1,0">
            <LinearGradientBrush.GradientStops>
                <GradientStopCollection>
                    <GradientStop Color="Transparent"
                    Offset="0" />

                    <GradientStop Color="#a0b7dc"
                    Offset="0.6" />
                    <GradientStop Color="Transparent"
                    Offset="1" />
                </GradientStopCollection>
            </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>
        <Style x:Key="BlueProgressBar"
       TargetType="ProgressBar">
            <Setter Property="Height" Value="10"/>
            <Setter Property="Margin" Value="5,5,5,5"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ProgressBar">
                        <Grid MinHeight="14"
              MinWidth="200"
              Background="{TemplateBinding Background}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Determinate" />
                                    <VisualState x:Name="Indeterminate">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="00:00:00"
                                                 Storyboard.TargetName="PART_Indicator"
                                                 Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush>Transparent</SolidColorBrush>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="PART_Track"
                  CornerRadius="2"
                  BorderThickness="1">
                                <Border.BorderBrush>
                                    <SolidColorBrush Color="Black" />
                                </Border.BorderBrush>
                            </Border>
                            <Border x:Name="PART_Indicator"
                  CornerRadius="2"
                  BorderThickness="1"
                  HorizontalAlignment="Left"
                  Background="{TemplateBinding Foreground}"
                  Margin="0,-1,0,1">
                                <Border.BorderBrush>
                                    <LinearGradientBrush StartPoint="0,0"
                                   EndPoint="0,1">
                                        <GradientBrush.GradientStops>
                                            <GradientStopCollection>
                                                <GradientStop Color="Black"
                                  Offset="0.0" />
                                                <GradientStop Color="Gray"
                                  Offset="1.0" />
                                            </GradientStopCollection>
                                        </GradientBrush.GradientStops>
                                    </LinearGradientBrush>

                                </Border.BorderBrush>
                                <Grid 
                  x:Name="Animation">
                                    <Rectangle x:Name="PART_GlowRect"
                         Width="100"
                         HorizontalAlignment="Left"
                         Fill="{StaticResource BlueProgressBarIndicatorAnimatedFill}"
                         Margin="-100,0,0,0" />
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0,1"
                           StartPoint="0,0">
                        <GradientStop Color="#363b4c"
                      Offset="0" />
                        <GradientStop Color="White"
                      Offset="1" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Foreground">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1"
                           StartPoint="0.5,0">
                        <GradientStop Color="#FF1D5BBA"
                      Offset="0" />
                        <GradientStop Color="White"
                      Offset="1" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <!-- Resource dictionary entries should be defined here. -->
         

    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"  Background="{StaticResource DefaultBackground}">
        <Grid.RowDefinitions>
            <RowDefinition Height="80"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
                
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="80"/>
           
            </Grid.RowDefinitions>
            <Image Source="/MP3tunes.LockerPlayer;component/Images/MP3tunes2.png" Width="120" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="0"></Image>
            <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1">
                <TextBlock Text="Locker Player" FontSize="45" Foreground="{StaticResource BaseForeground}" />
            </StackPanel>
            
        </Grid>
            
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,10,0,0" >
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="25"></RowDefinition>
                <RowDefinition Height="110"></RowDefinition>
            </Grid.RowDefinitions>
             <Grid Grid.Row="0"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="5,5,5,5" x:Name="mediaPane">
                  
                

                   



                    <ListBox HorizontalAlignment="Left"  
                              x:Name="listTracks"  
                            Style="{StaticResource LockerListStyle}"
                              ItemsPanel="{StaticResource LockerListItemsPanelTemplate}"
                             ItemContainerStyle="{StaticResource MediaPlayerListItemStyle}"
                             
                             ItemsSource="{Binding}" VerticalAlignment="Top" 
                             ItemTemplate="{StaticResource BlackListItemTemplate}">
              
                       


                    </ListBox>

                </Grid>
         
            
                <Grid  Grid.Row="1" HorizontalAlignment="Stretch"  Background="Black">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="100"/>
                    </Grid.ColumnDefinitions>
                <TextBlock  Name="elapsedTxt" Grid.Column="0" HorizontalAlignment="Left" TextAlignment="Left" Foreground="{StaticResource BaseForeground}"/>
                    <ProgressBar x:Name="seekBar"  IsIndeterminate="False" Grid.Column="1"  HorizontalAlignment="Stretch"/>

                <TextBlock  Name="durationTxt" Grid.Column="2"  HorizontalAlignment="Right" TextAlignment="Right" Foreground="{StaticResource BaseForeground}"/>
                </Grid>


            
          

                <Grid Grid.Row="2"  Height="110"  Background="{StaticResource DefaultGradient}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="70*"/>
                        

                        <ColumnDefinition Width="164"/>
                       

                        <ColumnDefinition Width="70*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                       
                        <RowDefinition Height="80"/>
                        <RowDefinition Height="35"/>

                    </Grid.RowDefinitions>


                <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Margin="0,0,0,0" Name="buttonPanel" Visibility="Collapsed">
                    <Button Name="previous" BorderThickness="0" Width="48" Height="48"  Margin="0,0,5,0" Padding="0,0,0,0" Click="previous_Click"   >
                        <Button.Template>
                            <ControlTemplate>
                                
                                <Image Source="/MP3tunes.LockerPlayer;component/Images/back.png"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Image>
                            </ControlTemplate>
                        </Button.Template>
                     
                    </Button>
                    <Button Name="play" BorderThickness="0" Width="48" Height="48"  Margin="0,0,5,0" Padding="0,0,0,0" Click="play_Click" >
                        <Button.Template>
                            <ControlTemplate>
                                <Image Source="/MP3tunes.LockerPlayer;component/Images/play.png"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Image>
                            </ControlTemplate>
                        </Button.Template>
                    </Button>
                    <Button Name="pause" BorderThickness="0" Width="48" Height="48"  Margin="0,0,5,0" Padding="0,0,0,0" Click="pause_Click" >
                        <Button.Template>
                            <ControlTemplate>
                                <Image Source="/MP3tunes.LockerPlayer;component/Images/pause.png"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Image>
                            </ControlTemplate>
                        </Button.Template>
                       
                    </Button>
                    <Button Name="next" BorderThickness="0" Width="48" Height="48"  Margin="0,0,5,0" Padding="0,0,0,0" Click="next_Click">
                        <Button.Template>
                            <ControlTemplate>
                                <Image Source="/MP3tunes.LockerPlayer;component/Images/next.png"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"></Image>
                            </ControlTemplate>
                           
                        </Button.Template>
                    </Button>

                </StackPanel>

 <StackPanel  Orientation="Horizontal" Grid.Row="0" Grid.Column="5" HorizontalAlignment="Right">

                    <Button Name="mute"  Style="{StaticResource MuteButtonStyle}" Margin="2">
                        
                        </Button>
                   

                    <Slider ManipulationCompleted="volume_ManipulationCompleted" Orientation="Vertical" Name="volume"  HorizontalAlignment="Right"   Minimum="0" Maximum="1">
                        <ToolTipService.ToolTip>
                            <ToolTip Content="Adjust Volume"></ToolTip>
                        </ToolTipService.ToolTip>
                    </Slider>
                    
                    <MediaElement Name="player" Grid.Row="0" Grid.Column="0" AutoPlay="True"  ></MediaElement>

                </StackPanel>

                    <!--<Slider x:Name="seekBar" Thumb.DragStarted="seekBar_DragStarted" Grid.Row="2" Grid.ColumnSpan="7" 
                        Thumb.DragCompleted="seekBar_DragCompleted"  />-->


                <ProgressBar x:Name="progress1" Grid.Row="1"  Grid.ColumnSpan="6"  Style="{StaticResource PerformanceProgressBar}" IsIndeterminate="True"></ProgressBar>
<TextBlock Name="status" Grid.Row="1"  Grid.ColumnSpan="6" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource BaseForeground}"></TextBlock>





                </Grid>
                <!--<smooth:SmoothStreamingMediaElement Name="player" Grid.Row="0" Grid.Column="0" AutoPlay="True"/>-->
            

        </Grid>
        <!--Pivot Control-->

    </Grid>

   
</phone:PhoneApplicationPage>